home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
amac33.arc
/
TOGL11.QM
< prev
next >
Wrap
Text File
|
1991-04-28
|
8KB
|
221 lines
* Toggle Insert and AutoIndent Macros, v1.1c
* TOGL11.QM
*
* Description:
*
* Macro Toggle Bytes Keeps cursor position ?
* @0 - AutoIndent On TH 46 No, begline
* @9 - Insert On TH 16 No, moves right
* @8 - Insert On KW 26 No, moves right
* @7 - Insert On TF 21 Yes
* @6 - Insert Off TF 21 Yes
* Authors........
* TH-Tom Hoghsead
* KW-Kyle Watkins
* TF-Tim Farley
* Version History:
* 1.0 Initial version, Alt9 & 0
* 1.1 Alt_6,7 & 8 added
* 1.1a Changed file name TOGGLE11 to TOGL11.
* 1.1b Modified this file documentation.
* 1.1c Modified this file documentation and added START.BAT.
* Changed TOGGLE file names to TOGL.
* For other macros, see ALLMACRO.INF.
* These macros require "QEdit and QMAC v2.1, February, 1990" or later.
*
* To BEGIN, just type "START TOGL" <Enter>. All pertinent files will be
* loaded in the "Ring" for viewing, and TOGL11.MAC is read.
* Alternatively, type "START TOGL 0" <Enter> and the disk copies of all
* files in the "Ring" will be loaded ready for editing, saving time.
*┌────────────────────────────────────┐
*│ @0 Toggle AutoIndent ON if OFF │
*└────────────────────────────────────┘
* Alt_0 is a macro to toggle AutoIndent ON if OFF. I don't have any use
* for it but maybe somebody does - I leave AutoIndent ON all the time.
* Alt_9, a macro to toggle Insert ON if OFF, prompted me to see if
* AutoIndent could also be toggled ON if OFF. No effort was spent
* optimizing Alt_0. Somebody may want to try that. If anybody can use
* it, use and enjoy. There no tricks here, just taking advantage of
* jtrue. By the way, AutoIndent can be toggled OFF if ON by replacing
* jtrue with jfalse. Don't run with cursor line in macro below or the
* ■'s in the comments will be found and things get messed up.
*
@0 macrobegin
setrmargin "3" return * set line 3 chars
insertline * insertblank line for bot para
begline * go to begin of line
cursorright * insert space
insertline * insert 2nd blank line
#254 * insert ■ on line in column 2
insertline * insert 3rd blank line
begline * go to begin of line
#254 #254 * insert ■■ in column 1 & 2
insertline * insert blank line for top para
wrappara * format paragraph
setrmargin "80" return * reset right margin
cursorup * get cursor line on bot para
begline * go to begline
find #254 return return * try to find ■
jtrue INDENTON: * if ■ in column 1, can't find
toggleindent * toggle AutoIndent ON
INDENTON: * begin clean up
delline * delete line ■
cursorup * cursor up to line ■■
delline * delete line ■■
cursorup * cursor up to blank line
delline * delete blank line
delline * delete blank line
scrollup * reallign screen
*
* 46 bytes Sat 07-28-1990 18:33:31
* 1
* 2
* 3 try Alt_0 here not above
* 4
* 5
* 6
*┌───────────────────────────────┐
*│ @9 toggles Insert ON if OFF │
*└───────────────────────────────┘
*
@9 macrobegin
insertline * insert test line
"a" cursorleft "a" * insert "aa"
endline * if not at endline-insert is on
jtrue END: * if at endline -insert is off
toggleinsert * toggle on if off
END: *
delline * delete test line
*
* 16 bytes Fri 07-27-1990 22:44:42
*┌────────────────────────────────┐
*│ @8 Toggle Insert ON if OFF │
*└────────────────────────────────┘
* Here's an alternate but slightly longer version written by Kyle
* Watkins of SemWare
*
@8 Macrobegin
Insertline
"x"
TESTINSERT:
Insertline
Cursorleft "a" Cursorleft "a"
Endline
Jtrue END:
Toggleinsert
END:
Delline
Endline
Delline
*
* 26 bytes Fri 07-27-1990 22:44:48
* Replace jtrue in Alt_9 line 3 and Alt_8 line 8 with jfalse
* to toggle off.
* To: TOM HOGSHEAD Refer#: 9159
* From: KYLE WATKINS Read: 07-30-90 (18:35)
* Subj: POSSIBLE QEDIT CHANGES Status: PUBLIC MESSAGE
* Conf: MAIN board (0) Read Type: GENERAL (A)
*
* Hi Tom,
* The macro has some steps in it which seem unneccesary -- but it takes
* care of the case of being in column 1 or column 512 AND it will
* preserve the original cursor location (since it is taking care of all
* possibilities, it does get involved -- but in most cases, as in yours,
* It can be cut back a few bytes.)
* Also -- many thanks for the assorted macros you have written -- many
* users will find them very useful.
* --... ...--
* .......Kyle Watkins (SemWare Technical Support)
*
* (H)elp, End of Message Command?
*
* Date: 07-30-90 (17:34) Number: 9191 / 9206
* To: TOM HOGSHEAD Refer#: 9159
* From: TIM FARLEY Read: NO
* Subj: POSSIBLE QEDIT CHANGES Status: PUBLIC MESSAGE
* Conf: MAIN board (0) Read Type: GENERAL (A)
*
* TH>@0 macrobegin
* TH> insertline * insert test line
* TH> "a" cursorleft "a" *
* TH> endline * if not at endline-insert is on
* TH> jtrue END: * if at endline -insert is off
* TH> toggleinsert * toggle on if off
* TH> END: *
* TH> delline * delete test line
*
* Neat macro, Tom! However, it does have a slight side effect of
* moving the current cursor position to the right. Here are
* versions that make sure to undo that:
*
* SET INSERT ON
*
@7 macrobegin
insertline * insert test line
"a" cursorleft "a" *
endline * if not at endline-insert is on
jtrue WASON: * if at endline -insert is off
toggleinsert * toggle on it on
Jump WASOFF: * and exit.
WASON:
cursorleft * clean up cursor movement
WASOFF:
cursorleft * clean up cursor movement
delline * delete test line
*
* 21 bytes Mon 07-30-1990 19:15:36
*
* SET INSERT OFF
*
@6 macrobegin
insertline * insert test line
"a" cursorleft "a" *
endline * if not at endline-insert is on
jtrue WASON: * if at endline -insert is off
Jump WASOFF:
WASON:
toggleinsert * toggle it off
cursorleft * clean up cursor movement
WASOFF:
cursorleft * clean up cursor movement
delline * delete test line
*
* 21 bytes Mon 07-30-1990 19:16:01
* --Tim Farley
* Subject (Enter)=no change?
* Message Security (H)=help?
* *
* Enter your text. (Enter) alone to end. (72 chars/line, 75 lines maximum)
* (------------------------------------------------------------------------)
* 1: Tim,
* 2: Thanks for the suggested improvements. I'll study off line.
* 3: ..Tom
* 4:
*
*
* Saving Message # 9207.
*
*...Tom Hogshead Wed 10-31-1990